package com.example.arithmeticleetcode.learnArithmetic.quque;


/**
 * @program: arithmetic-leetcode
 * @description: 使用双向链表实现队列
 * @author: FangZhen
 * @create: 2020-08-20 16:14
 **/
public class Quque<E> {

    private List<E> list = new LinkedList<>();

    public void clear() {
        list.clear();
    }

    public int size() {
        return list.size();
    }

    public boolean isEmpty() {
        return list.isEmpty();
    }

    public void enQuque(E e) {
        list.add(e);
    }

    public E deQuque() {
        return list.remove(0);
    }

    public E front() {
        return list.get(0);
    }


}
